/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package helper.tx.tta;

import java.io.Serializable;

/**
 *
 * @author Lu Xiaodi
 */
public class Helper_IPCluster implements Serializable, Comparable {

    private Long outletId;
    private String stakeholderName;
    private String outletName;
    private Long popularity;
    private Long serialNumber;

    public Helper_IPCluster() {
    }

    public Helper_IPCluster(Long outletId, Long popularity) {
        this.outletId = outletId;
        this.popularity = popularity;
    }

    public Helper_IPCluster(Long outletId, String stakeholderName, String outletname, Long popularity) {
        this.outletId = outletId;
        this.stakeholderName = stakeholderName;
        this.outletName = outletname;
        this.popularity = popularity;
    }

    public Long getOutletId() {
        return outletId;
    }

    public void setOutletId(Long outletId) {
        this.outletId = outletId;
    }

    public Long getPopularity() {
        return popularity;
    }

    public void setPopularity(Long popularity) {
        this.popularity = popularity;
    }

    public String getOutletName() {
        return outletName;
    }

    public void setOutletName(String outletName) {
        this.outletName = outletName;
    }

    public Long getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(Long serialNumber) {
        this.serialNumber = serialNumber;
    }

    public String getStakeholderName() {
        return stakeholderName;
    }

    public void setStakeholderName(String stakeholderName) {
        this.stakeholderName = stakeholderName;
    }

    @Override
    public int compareTo(Object o) {
        if (!(o instanceof Helper_IPCluster)) {
            throw new UnsupportedOperationException("Not supported yet.");
        } else if (this.getPopularity() > ((Helper_IPCluster) o).getPopularity()) {
            return 1;
        } else if (this.getPopularity() < ((Helper_IPCluster) o).getPopularity()) {
            return -1;
        } else {
            return 0;
        }
    }

    @Override
    public String toString() {
        return "Helper_Cluster:: outletId=" + outletId + ", popularity=" + popularity;
    }
}
